package cn.edu.ctbu.bootstrap521.controller;

import cn.edu.ctbu.bootstrap521.domain.Student;
import cn.edu.ctbu.bootstrap521.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@RequestMapping("/student")
public class StudentController {
    @Autowired
    private StudentService studentService;
    /**
     * 查询全部学生信息
     * @return
     */
    @GetMapping("/list")
    public Page<Student> GetAll(Pageable pageable){
        return studentService.getAll(pageable);
    }
}
